home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cppdll
/
test.cxx
< prev
next >
Wrap
Text File
|
1990-03-07
|
842b
|
47 lines
// written by A.P.Mazur
#include "console.hxx"
#undef NULL
#include "stdio.h"
#define LINE_SIZE 200
local char buffer[LINE_SIZE];
export int PASCAL WinMain(HANDLE hInstance,HANDLE hPrev,LPSTR cmdLine,int cmdShow)
{
Console cout("C++ class in a DLL");
if (!cout.valid())
return;
cout.show();
FILE *file;
file = fopen("console.hxx","rt");
if (file) {
do {
fgets(buffer,LINE_SIZE,file);
cout << buffer;
cout.newLine();
} while (!feof(file));
fclose(file);
}
cout << "an int " << 133;
cout.newLine();
cout << "a long " << 12345678L;
cout.newLine();
cout << "a double " << -12.45;
cout.newLine();
cout << "a NULL " << (char *)NULL;
cout.newLine();
return (cout.runModeless());
}